<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.tisson.pojo.Page"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<script type="text/javascript">
function checkAll(name) {
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++){
		if((el[i].type=="checkbox") && (el[i].name==name)){
			el[i].checked = true;
		}
	}
}
function clearAll(name){
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++){
		if((el[i].type=="checkbox") && (el[i].name==name)){
			el[i].checked = false;
		}
	}
} 
function trim(str){
	return str.replace(/(^\s*)|(\s*$)/g,"");
}
function form_submit(){
	document.getElementById("form").submit();
}
function goto(){
	var arg = document.getElementById("page_goto").value;
	if(!checkIsInteger(arg)){
		arg = 1;
	}
	var url = "Page_changePage.action?requestPage="+arg+"&map=JspCmUserList";
	window.navigate(url);
}
function checkIsInteger(str)   {    
    if(/^(\-?)(\d+)$/.test(str))   
        return true;   
    else  
        return false;   
}
</script>
		<title></title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<style type="text/css">
img {
	border: 0;
}

body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}

a {
	font-size: 12px;
	color: #3b6375;
}

.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}

.STYLE6 {
	color: #000000;
	font-size: 12;
}

.STYLE10 {
	color: #000000;
	font-size: 12px;
}

.STYLE19 {
	color: #344b50;
	font-size: 12px;
}

.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}

.STYLE22 {
	font-size: 12px;
	color: #295568;
}

.submitStyle {
	background: url(images/del.gif);
	border: 0px
}
</style>
	</head>
	<body>
		<form name="searchForm" action="User_search" method="post">
			<table width="100%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td height="30">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="24" bgcolor="#353c44">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="6%" height="19" valign="bottom">
															<div align="center">
																<img src="images/tb.gif" width="14" height="14" />
															</div>
														</td>
														<td width="94%" valign="bottom">
															<span class="STYLE1">搜索</span>
														</td>
													</tr>
												</table>
											</td>
											<td>
												<div align="right">
													<span class="STYLE1"> <input type="image"
															src="images/search.jpg" onClick="searchForm.submit()" />
													</span>
													<span class="STYLE1"> &nbsp; </span>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellpadding="0" cellspacing="1"
							bgcolor="#a8c7ce">
							<tr>
								<td width="21%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">工号</span>
									</div>
								</td>
								<td width="5%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10"></span>
									</div>
								</td>
								<td width="21%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">员工姓名</span>
									</div>
								</td>
								<td width="5%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10"></span>
									</div>
								</td>
								<td width="21%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">登记电话</span>
									</div>
								</td>
								<td width="5%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10"></span>
									</div>
								</td>
								<td width="21%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">所属部门</span>
									</div>
								</td>
								<td width="5%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10"></span>
									</div>
								</td>
								<td width="21%" height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">状态</span>
									</div>
								</td>
							</tr>
							<tr>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<input type="text" name="workerNO" />
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<select name="logicMark0">
											<option value="AND">
												与
											</option>
											<option value="OR">
												或
											</option>
										</select>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<input type="text" name="username" />
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<select name="logicMark1">
											<option value="AND">
												与
											</option>
											<option value="OR">
												或
											</option>
										</select>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<input type="text" name="callId" />
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<select name="logicMark2">
											<option value="AND">
												与
											</option>
											<option value="OR">
												或
											</option>
										</select>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<input type="text" name="userDepartment" />
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<select name="logicMark3">
											<option value="AND">
												与
											</option>
											<option value="OR">
												或
											</option>
										</select>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF" class="STYLE19">
									<div align="center">
										<select name="userState">
											<option value="0">
												有效
											</option>
											<option value="1">
												无效
											</option>
										</select>
									</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
		<table width="100%" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="30">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="24" bgcolor="#353c44">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="6%" height="19" valign="bottom">
														<div align="center">
															<img src="images/tb.gif" width="14" height="14" />
														</div>
													</td>
													<td width="94%" valign="bottom">
														<span class="STYLE1"> 员工信息列表</span>
													</td>
												</tr>
											</table>
										</td>
										<td>
											<div align="right">
												<span class="STYLE1"> <input type="checkbox"
														name="checkbox" value=""
														onclick="if(this.checked==true) { checkAll('id'); } else { clearAll('id'); }" />全选&nbsp;&nbsp;
													<input type="image" src="images/add.gif"
														onClick="location.href='User_add.action'" />
													添加&nbsp;&nbsp; <input type="image" src="images/del.gif"
														id="_delete" name="method:delete" onClick="form_submit()" />
													删除&nbsp;&nbsp; </span>
												<span class="STYLE1"> &nbsp; </span>
											</div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellpadding="0" cellspacing="1"
						bgcolor="#a8c7ce">
						<tr>
							<td width="4%" height="20" bgcolor="d3eaef" class="STYLE10">
								<div align="center">
									<input type="checkbox" name="checkbox" value=""
										onclick="if(this.checked==true) { checkAll('id'); } else { clearAll('id'); }" />
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">工号</span>
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">员工姓名</span>
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">所属部门</span>
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">登记电话号码</span>
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">开门有效期限</span>
								</div>
							</td>
							<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">状态</span>
								</div>
							</td>
							<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6">
								<div align="center">
									<span class="STYLE10">基本操作</span>
								</div>
							</td>
						</tr>
						<form name="form" action="User_delete" method="post">
							<s:iterator value="result" status="status">
								<tr>
									<td height="20" bgcolor="#FFFFFF">
										<div align="center">
											<input type="checkbox" name="id"
												value="<s:property value="userId"/>" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:property value="workerNO" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:property value="username" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:property value="DepName" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:property value="callId" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:date name="expiryDate" format="yyyy-mm-dd" />
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											<s:if test="userState == 0">有效</s:if>
											<s:else>无效</s:else>
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF">
										<div align="center" class="STYLE21">
											<a href="User_delete.action?id=<s:property value="userId"/>">删除</a>
											|
											<a href="User_edit.action?id=<s:property value="userId"/>">编辑</a>
										</div>
									</td>
								</tr>
							</s:iterator>
						</form>
					</table>
				</td>
			</tr>
			<tr>
				<td height="30">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="33%">
								<div align="left">
									<span class="STYLE22">&nbsp;&nbsp;&nbsp;&nbsp;共有<strong><s:property
												value="page.listSize" />
									</strong> 条记录，当前第<strong><s:property value="page.currentPage" />
									</strong> 页，共 <strong><s:property value="page.totalPages" />
									</strong> 页</span>
								</div>
							</td>
							<td width="67%">
								<table width="312" border="0" align="right" cellpadding="0"
									cellspacing="0">
									<tr>
										<td width="49">
											<div align="center">
												<a
													href="Page_changePage.action?requestPage=1&map=JspCmUserList"><img
														src="images/main_54.gif" width="40" height="15" />
												</a>
											</div>
										</td>
										<td width="49">
											<div align="center">
												<a
													href="Page_changePage.action?requestPage=<s:property value="page.prePage"/>&map=JspCmUserList"><img
														src="images/main_56.gif" width="40" height="15" />
												</a>
											</div>
										</td>
										<td width="49">
											<div align="center">
												<a
													href="Page_changePage.action?requestPage=<s:property value="page.nextPage"/>&map=JspCmUserList"><img
														src="images/main_58.gif" width="40" height="15" />
												</a>
											</div>
										</td>
										<td width="49">
											<div align="center">
												<a
													href="Page_changePage.action?requestPage=<s:property value="page.totalPages"/>&map=JspCmUserList"><img
														src="images/main_60.gif" width="40" height="15" />
												</a>
											</div>
										</td>
										<td width="37" class="STYLE22">
											<div align="center">
												转到
											</div>
										</td>
										<td width="22">
											<div align="center">
												<input type="text" name="textfield" id="page_goto"
													style="width: 20px; height: 12px; font-size: 12px; border: solid 1px #7aaebd;" />
											</div>
										</td>
										<td width="22" class="STYLE22">
											<div align="center">
												页
											</div>
										</td>
										<td width="35">
											<img src="images/main_62.gif" width="26" height="15"
												onClick="goto()" />
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
